<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>JSON 字符串转 js 对象，js 对象转 JSON 字符串</title>
</head>

<body>
  <script>
    // var obj = {

    // }

    var i = '{ "asa": "asas" , "sjj" : "skks"}'
    var aa = JSON.parse(i)  //转对象
    var ii = JSON.stringify(aa)  //转数组
    console.log(aa);
    console.log(ii);

  </script>
</body>

</html>